#pragma once

#include <allegro5/allegro.h>

class Vector;

class Input
{
private:
	ALLEGRO_KEYBOARD_STATE _key_state_curr;
	ALLEGRO_KEYBOARD_STATE _key_state_prev;

	ALLEGRO_MOUSE_STATE _mouse_state_curr;
	ALLEGRO_MOUSE_STATE _mouse_state_prev;

	void _CurrentToPrevious();

	void _PollKeyboard();
	void _PollMouse();

public:
	Input();

	bool IsKeyUp(const int key) const;
	bool IsKeyDown(const int key) const;
	bool IsKeyPressed(const int key) const;
	bool IsKeyReleased(const int key) const;

	bool LeftClick() const;

	Vector GetMousePosition() const;

	void PollInputDevices();
};